<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>商品管理</title>
    <div th:replace="common_cssjs"></div>
    <link type="text/css" rel="stylesheet" media="screen" th:href="@{/css/product.css}">
    <script th:src="@{/js/product.js}" type="text/javascript"></script>

</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <div th:replace="common/adminNav::admin"></div>
    <div class="row">
        <table class="table table-striped">
            <thead>
                <tr>
                    <td>ID</td>
                    <td>名称</td>
                    <td>型号</td>
                    <td>编码</td>
                    <td>价格</td>
                    <td>库存</td>
                    <td>操作</td>
                </tr>
            </thead>
            <tbody>
                    <tr th:each="product:${page.result}" th:pid="${product.id}">
                        <td th:text="${product.id}"></td>
                        <td th:text="${product.title}"></td>
                        <td th:text="${product.model}"></td>
                        <td th:text="${product.code}"></td>
                        <td th:text="${product.point}"></td>
                        <td th:text="${product.stock}"></td>
                        <td><a th:href="@{'/admin/product/edit/'+${product.id}}">修改</a></td>
                    </tr>
            </tbody>
        </table>
    </div>
    <!--<div class="text-center">
        <tags:pagination page="${page}" paginationSize="${page.pageSize}"/>
    </div>-->
    <a class="btn btn-primary" th:href="@{/admin/product/new}">添加</a>

</div>
<!-- /container -->
<div th:replace="common/footer::copy"></div>
</body>
</html>